import scrapy
from scrapy import Request

# 如果有多个爬虫，可以在这里写多个class，注意爬虫名称

from spider.item_monitor_video import SpiderItem

class MarketIndustryoverviewSpider(scrapy.Spider):
    name = 'monitor_video'

    def start_requests(self):
        for url in ['http://localhost:22222/', 'http://localhost:22222/']:
            yield Request(url, meta={}, dont_filter=True)

    def parse(self, response):
        item = SpiderItem()
        item['name'] = '张三'
        yield Request('http://localhost:22222', meta={'item':item}, callback=self.parse2)

    def parse2(self, response):
        item = response.meta['item']
        item['age'] = 23
        yield item

